#pragma once
#include <vector>
#include <map>
#include "node_data.h"
#include "time_capture.h"

class NodeGroup
{
public:
	NodeGroup(int total_nodes);
	~NodeGroup();
	
	DayData getDayData(int node_id, dateData date);
	void updateAllnodesLables();
	void updateAllnodesData(dateData begin_date, dateData end_date);
	void delectAllnodesData(dateData begin_date, dateData end_date);
	void pushBackNodeMomentData(int node_id, StampStruct stamp, bool PowerON);
	NodeData operator [] (int node_id);
	void updateRankMap(dateData begin_date, dateData end_date);
	void SortPairVec_Sec(std::vector<std::pair<int, int>>& input_vec);
	int getIdByOrder(int order);
	void updateNowStamp(StampStruct input_stamp);

private:
	std::vector<std::pair<int, int>> list_id_minute;
	std::vector<NodeData> node_list;
	int TotalNodes;
};

extern NodeGroup node_group;
